#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>
#include <sys/wait.h>
#include <sys/types.h>

int main()
{
  int pid = fork();
  if (pid == 0)
  {
    // child
    exit(30);
  }

  // father
  int status = 0;
  waitpid(pid,&status,0);

  printf("i get the exit code is:%d\n",WEXITSTATUS(status));
  return 0;
}
